package com.example.sunran;

import com.example.sunran.model.PhoneInfo;
import com.example.sunran.service.PhoneRecognizeService;
import com.example.sunran.service.impl.PhoneRecognizeServiceImpl;

import java.util.Scanner;


public class Application {
    private  static  PhoneRecognizeService phoneRecognizeService = new PhoneRecognizeServiceImpl();

    public static void main(String[] args) {

        System.out.println("正在初始化数据库。。。。");
        phoneRecognizeService.initPhoneInfo();
        System.out.println("初始化成功！");
        System.out.println("输入手机号码：");

        Scanner scanner = new Scanner(System.in);

        String line = "";
        while ((line=scanner.nextLine() )!= null) {
            PhoneInfo phoneInfo = phoneRecognizeService.onCall(line);
            System.out.println(phoneInfo);
        }

    }
}
